using HCore.IOC.Context.Event;
using JetBrains.Annotations;
using UI.UIGame.Cursor.Event;
using UnityEngine;

namespace UI.UIGame.Cursor
{
    [UsedImplicitly]
    [HCore.IOC.Context.Stereotype.Component]
    public class CursorService : EventPublisher
    {
        /// <summary>
        ///     设置鼠标图标
        /// </summary>
        /// <param name="sprite"></param>
        /// <param name="color"></param>
        public void ShowCursorIcon(Sprite sprite, Color color)
        {
            PublishEvent(new ShowCursorIconEvent(sprite, color));
        }

        /// <summary>
        ///     隐藏鼠标图标
        /// </summary>
        public void HiddenCursorIcon()
        {
            PublishEvent(new ShowCursorIconEvent());
        }
    }
}